From: Olaf Hering Date: Fri, 10 Jun 2011 08:47:23 +0000 (+0200) Subject: xenpaging: start paging in the middle of gfn range X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10137 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=46a3d35ca3f76b2b2b0e3fdf9036ec1e279ef8cb;p=xen.git xenpaging: start paging in the middle of gfn range Set the starting gfn to somewhere in the middle of the gfn range to avoid paging during BIOS startup. This can speedup booting of a guest. Signed-off-by: Olaf Hering Committed-by: Ian Jackson --- diff --git a/tools/xenpaging/policy_default.c b/tools/xenpaging/policy_default.c index 83fe830309..0d32c94859 100644 --- a/tools/xenpaging/policy_default.c +++ b/tools/xenpaging/policy_default.c @@ -69,6 +69,10 @@ int policy_init(xenpaging_t *paging) /* Don't page out page 0 */ set_bit(0, bitmap); + /* Start in the middle to avoid paging during BIOS startup */ + current_gfn = max_pages / 2; + current_gfn -= paging->num_pages / 2; + rc = 0; out: return rc;